<form class="form mt10" method="post" action="{:U('User/modifyPost')}" id="form">
  <div class="form-item">
    <input type="text" name="name" readonly="readonly" placeholder="" value="{$user.name}">
  </div>
  <div class="form-item">
    <input type="text" name="nick_name" placeholder="输入在商城显示的昵称" value="{$user.nick_name}">
  </div>
  <div class="form-item">
    <input type="password" name="old_password" placeholder="输入现在的密码">
  </div>
  <div class="form-item">
    <input type="password" name="password" placeholder="输入要更改的密码">
  </div>
  <div class="form-item">
    <input type="hidden" name="sid" value="{$sid}">
    <input type="submit" class="btn btn-blue" value="保存更改">
  </div>
</form>
<script type="text/javascript">
  (function(){
    var form = document.getElementById ( "form" );
    form.onsubmit = function () {
      var info = GH.serialize ( "form" );
      GH.ajax ( "{:U('User/modifyPost')}", info, function(data){
        GH.showMessage ( data.msg );
      }, "post");
      return false; 
    };
  })();
</script>